﻿using System.Web;
using System.Web.Optimization;

namespace Cnm.Mvc.Web
{
    public class BundleConfig
    {
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.validate*"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css"));

            bundles.Add(new ScriptBundle("~/bundles/kendojs").Include(
                "~/Scripts/kendo/kendo.all.min.js",
                "~/Scripts/kendo/kendo.aspnetmvc.min.js",
                "~/Scripts/kendo/cultures/kendo.culture.vi.min.js"));

            bundles.Add(new StyleBundle("~/Content/kendocss").Include(
                "~/Content/kendo/kendo.common.min.css",
                "~/Content/kendo/kendo.bootstrap.min.css"
                ));

            #region Admin Site

            bundles.Add(new ScriptBundle("~/Areas/Admin/Content/bundles/adminkendojs").Include(
                "~/Areas/Admin/Scripts/kendo/kendo.all.min.js",
                "~/Areas/Admin/Scripts/kendo/kendo.aspnetmvc.min.js"));

            bundles.Add(new StyleBundle("~/Content/admincss").Include(
                "~/Areas/Admin/Content/cnm.admin.master.css"
                ));

            bundles.Add(new StyleBundle("~/Areas/Admin/Content/adminkendocss").Include(
                "~/Areas/Admin/Content/kendo/kendo.common.min.css",
                "~/Areas/Admin/Content/kendo/kendo.default.min.css"
                ));

            #endregion

            // Set EnableOptimizations to false for debugging. For more information,
            // visit http://go.microsoft.com/fwlink/?LinkId=301862
            BundleTable.EnableOptimizations = true;
        }
    }
}
